home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Mark Pilgrim / Ghost 1.0 / source / Ghost ƒ / MSG Shell ƒ / msg prefs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-30  |  2.2 KB  |  82 lines  |  [TEXT/KAHL]

  1. /**********************************************************************\
  2.  
  3. File:        msg prefs.h
  4.  
  5. Purpose:    This is the header file for msg prefs.c
  6.  
  7.  
  8. Ghost -=- a classic word-building challenge
  9. Copyright (C) 1993 Mark Pilgrim
  10.  
  11. This program is free software; you can redistribute it and/or modify
  12. it under the terms of the GNU General Public License as published by
  13. the Free Software Foundation; either version 2 of the License, or
  14. (at your option) any later version.
  15.  
  16. This program is distributed in the hope that it will be useful,
  17. but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19. GNU General Public License for more details.
  20.  
  21. You should have received a copy of the GNU General Public License
  22. along with this program in a file named "GNU General Public License".
  23. If not, write to the Free Software Foundation, 675 Mass Ave,
  24. Cambridge, MA 02139, USA.
  25.  
  26. \**********************************************************************/
  27.  
  28. #include "Folders.h"
  29.  
  30. #define        PREFS_FILE_NAME            "\pGhost prefs"
  31. #define        PREFS_TYPE                'PREF'
  32. // CREATOR is #defined in "ghost globals.h"
  33. #define        PREFS_HEADER_VERSION    1
  34.  
  35. extern    Boolean        gCanSavePrefs;
  36. extern    Str255        gMyName;
  37. extern    Str255        gMyOrg;
  38.  
  39. typedef struct
  40. {
  41.     char            regname[40];
  42.     char            regorg[40];
  43.     unsigned char    sound;
  44.     unsigned char    messagebox;
  45.     unsigned char    intelligence;
  46.     unsigned char    speed;
  47.     unsigned char    fulldict;
  48.     unsigned char    unused;
  49.     int                numcomputerplayers;
  50.     long            fileID;
  51. } PrefStruct;
  52.  
  53. int PreferencesInit(void);
  54. void PrefsError(int err);
  55. int OpenPrefsFile(int *prefsFileID);
  56. int SetupNewPrefsFile(int prefsFileID);
  57. void ClosePrefsFile(int prefsFileID);
  58. int GetNextPrefs(int prefsFileID);
  59. int SavePrefs(int prefsFileID);
  60. int CheckVersion(int prefsFileID);
  61. int GetFileID(void);
  62. int CheckFileID(void);
  63. int Virgin(int prefsFileID);
  64. void DefaultPrefs(void);
  65. void CopyGlobalsToPrefs(void);
  66. void CopyPrefsToGlobals(void);
  67. void GetRegistration(void);
  68. void SaveThePrefs(void);
  69.  
  70. enum
  71. {
  72.     prefs_allsWell=0,
  73.     prefs_diskReadErr=-1,
  74.     prefs_diskWriteErr=-2,
  75.     prefs_cantOpenPrefsErr=-3,
  76.     prefs_cantCreatePrefsErr=-4,
  77.     prefs_noMorePrefsErr=-5,
  78.     prefs_versionNotSupportedErr=-6,
  79.     prefs_virginErr=-7,
  80.     prefs_IDNotMatchErr=-8
  81. };
  82.